package service.impl;

import dao.RoomMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import pojo.Room;
import service.RoomService;

import java.util.List;

@Service
public class RoomServiceImpl implements RoomService {

    @Autowired
    private RoomMapper roomMapper;

    @Override
    public Room findById(int roomId) {
        return roomMapper.findById(roomId);
    }

    @Override
    public List<Room> findAll() {
        return roomMapper.findAll();
    }

    @Override
    public int addRoom(Room room) {
        return roomMapper.addRoom(room);
    }

    @Override
    public int updateRoom(Room room) {
        return roomMapper.updateRoom(room);
    }

    @Override
    public int deleteRoom(int roomId) {
        return roomMapper.deleteRoom(roomId);
    }

    @Override
    public List<Room> findByDepartId1(int departId1) {
        return roomMapper.findByDepartId1(departId1);
    }
}